maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=jsonnet-language-server
pkgver=0.14.1
pkgrel=0
pkgdesc="Jsonnet language server"
url="https://github.com/grafana/jsonnet-language-server"
arch="all"
license="AGPL-3.0-or-later"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/grafana/jsonnet-language-server/archive/refs/tags/v$pkgver.tar.gz"
options="net" # download Go modules

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -ldflags "-X main.version=v$pkgver"
}

check() {
	go test ./...
}

package() {
	install -Dm755 $pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
98d073574dc15fb603cacdc98db4474ec1325e5333a1ae30ef00048cd6fd0aa2f6438f5dfd58e20d35928418f319cf54964be2f735ba604279c90e458858f271  jsonnet-language-server-0.14.1.tar.gz
"
